allow a not_in_domain_value in interpolate!#120
Conversation
pjaap
left a comment
There was a problem hiding this comment.
I generally like this. Can you cover this by a small test?
For some reason I would prefer to have a failure if no not_in_domain_value is set.
How about the default nothing and keep the @assert in this case? The NaN default may lead to hard to catch errors.
|
I can think about a test. But I would like to remove the @Assert for the UnicodePlots extension. Here I need to interpolate on a rectangular grid that is possibly larger than the original grid. If I don't remove the assert this would crash. But maybe we can offer a boolean check_if_not_in_domain instead of not_in_domain_value and then set NaN if the check fails? |
|
Ideally, we have both My suggestion aimed at using internally |
|
Ah, ok if they are set in that way, I think the check does not need to be a kwarg, since anyone who sets a different not_in_domain_values also wants it to be used. But it also would not hurt to have both as a kwarg. |
0003b6f to
7f0f37f
Compare
|
Rebased and ready to be merged. |
When a grid is interpolated onto a smaller grid, it can happen that the tested node is not in the new domain and the @Assert causes a crash. Instead this PR suggests to set a not_in_domain_value.